
import { stringify } from 'qs';
import request from '@/utils/request';

import webpath from '@/utils/webpath';

export async function deleteByPrimaryKeyForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/delete?${stringify(params)}`);
}


export async function selectByPrimaryKeyForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/get?${stringify(params)}`);

}


export async function insertForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/insert`, {

        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function updateForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/update`, {

        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function deleteByMapForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/deleteByMap`, {

        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateByMapForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/updateByMap`, {

        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getOneForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/getOne`, {

        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}



export async function getAllForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/getAll`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function queryPageForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/queryPage`, {

        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}


export async function countForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/count`, {

        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}

export async function insertBatchForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/insertBatch`, {

        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function deleteBatchForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/deleteBatch`, {
        method: 'POST',
        data: {
            ...params,
            method: 'delete',
        },
    });
}


export async function updateBatchForProMenu(params = {}) {

    return request(`/hrath/web/api/service/promenu/updateBatch`, {

        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getAllForProMenuByUserId(params = {}) {

    return request(`/hrath/web/api/service/promenu/getAllForProMenuByUserId`, {

        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}

export async function getProMenuTreeByLevelCode(params = {}) {

    return request(`/hrath/web/api/service/promenu/getProMenuTreeByLevelCodeForForm`, {
        method: 'POST',
        data: {
            ...params,
            method: 'fetch',
        },
    });
}
















